<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<% String ln = new String(request.getParameter("lname").getBytes("ISO-8859-1"),"UTF-8");
boolean flag = false;
String str = "\\w{1,20}";		//lname必须为数字，字母，或下划线。
if(ln.matches(str)){
	flag = true;
	out.println("<span id='w6'><font color = green>Lastname is available!</font></span>");
}else{
	out.println("<span id = 'w6'><font color = red>LastName must be letters or digits or underscore!<font></span>");
}
%>